# Contributor: Lucas Ramage <ramage.lucas@protonmail.com>
# Maintainer: Lucas Ramage <ramage.lucas@protonmail.com>
pkgname=mustach
pkgver=0.99_git20200124
_sha=62f2b3c5625de3292ea86ca92a077e162db75911 # contains fully qualified soname
pkgrel=1
pkgdesc="C implementation of mustache templating"
url="https://gitlab.com/jobol/mustach"
arch="all !mips !mips64" # testsuite crashes on mips
license="Apache-2.0"
makedepends="json-c-dev valgrind"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://gitlab.com/jobol/mustach/-/archive/$_sha/mustach-$_sha.tar.bz2"
builddir="$srcdir/$pkgname-$_sha"

build() {
	make
}

check() {
	make test
}

package() {
	make -j1 DESTDIR="$pkgdir" PREFIX="/usr" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 AUTHORS README.md \
		"$pkgdir"/usr/share/doc/$pkgname/
}
sha512sums="d2cd892ff936d400b1776a298bad81b38289733b215c6d5ccd7601001e26282a57d9cdcab514c0b48a4109b156f398904e5f3304765b32bec6ad95c7749c8220  mustach-62f2b3c5625de3292ea86ca92a077e162db75911.tar.bz2"
